import { request } from '@ruifox-cms/utils'
//新增公告
export function createAnnouncement(data) {
  return request({
    baseURL: "/10101_api",
    url: '/oltes/api/v1/system/announcement/create',
    method: 'post',
    data
  })
}
//修改公告
export function updateByIdAnnouncement(data) {
  return request({
    baseURL: "/10101_api",
    url: '/oltes/api/v1/system/announcement/updateById',
    method: 'post',
    data
  })
}
//查询公告
export function pagingAnnouncement(data) {
  return request({
    baseURL: "/10101_api",
    url: '/oltes/api/v1/system/announcement/paging',
    method: 'post',
    data
  })
}
//批量 删除公告
export function deleteByIdsAnnouncement(data) {
  return request({
    baseURL: "/10101_api",
    url: '/oltes/api/v1/system/announcement/deleteByIds',
    method: 'post',
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded', // 设置请求头
    },
    data
  })
}
//根据Id查询公告
export function selectByIdAnnouncement(params) {
  return request({
    baseURL: "/10101_api",
    url: '/oltes/api/v1/system/announcement/selectById',
    method: 'get',
    params
  })
}
//获取指定目标下的公告
export function getTargetAnnouncements(params) {
  return request({
    baseURL: "/10101_api",
    url: '/oltes/api/v1/system/announcement/getTargetAnnouncements',
    method: 'get',
    params
  })
}